package com.hoas.comparedb.entity;

import java.util.Objects;

public class TableIndex {

    private String tableSchema;

    private String tableName;

    private String indexName;

    private String compositIndex;

    private String indexType;

    private String indexComment;

    private Integer nonUnique;

    public String getTableSchema() {
        return tableSchema;
    }

    public void setTableSchema(String tableSchema) {
        this.tableSchema = tableSchema;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getCompositIndex() {
        return compositIndex;
    }

    public void setCompositIndex(String compositIndex) {
        this.compositIndex = compositIndex;
    }

    public String getIndexType() {
        return indexType;
    }

    public void setIndexType(String indexType) {
        this.indexType = indexType;
    }

    public String getIndexComment() {
        return indexComment;
    }

    public void setIndexComment(String indexComment) {
        this.indexComment = indexComment;
    }

    public Integer getNonUnique() {
        return nonUnique;
    }

    public void setNonUnique(Integer nonUnique) {
        this.nonUnique = nonUnique;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TableIndex that = (TableIndex) o;
        return Objects.equals(tableName, that.tableName) && Objects.equals(indexName, that.indexName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tableSchema, tableName, indexName);
    }
    
}
